#ifndef __ILIB_TP_LISTENER_H_20120323__
#define __ILIB_TP_LISTENER_H_20120323__

class iTPConnection;
class iTPListener
{
public:
	static iTPListener* new_instance(const char* address, iAllocator* alloc=iSingleton<iAllocator>::instance());

public:
	class iSink
	{
	public:
		virtual void on_connection_indication(iTPConnection* iConn, iMsgDB* req) = 0;
	};

	virtual bool listen(iTPListener::iSink* sink) = 0;
	virtual void close() = 0;
};

#endif  //__ILIB_TP_LISTENER_H_20120323__
